<?php foreach($this->list AS $key => $val) { ?>
	<li id="notification_<?php echo $val['notification_id']; ?>"><div class="not_div"> 
    <p class="nots_open"><?php if($this->flag == '1'){ ?><span title="删除" class="del_Msg" onclick="mark_notifications(<?php echo $val['notification_id']; ?>, false)">x</span><?php } ?><?php if($val['extend_count'] > 1){ ?><a href="javascript:;" onclick="aw.nots_open(this);">展开</a><?php } ?></p>
<?php if($val['extend_count'] > 1){ ?>
	<?php if($val['model_type'] == notify_class::CATEGORY_QUESTION){?>
		<?php echo $val['extend_count']; ?> 项关于问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
	<?php } ?>
<?php }else{ ?>
	<?php if($val['action_type'] == notify_class::TYPE_PEOPLE_FOCUS){ ?>
		<a href="<?php echo $val['key_url']; ?>" title="<?php echo $val['p_username']; ?>"><?php echo $val['p_username']; ?></a> 关注了你
	<?php }else if($val['action_type'] == notify_class::TYPE_NEW_ANSWER){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 回复了问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
	<?php }else if($val['action_type'] == notify_class::TYPE_COMMENT_AT_ME){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 在问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> 中的评论提到了你
	<?php }else if($val['action_type'] == notify_class::TYPE_INVITE_QUESTION){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 邀请你参与问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
	<?php }else if($val['action_type'] == notify_class::TYPE_ANSWER_COMMENT){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 评论了你在问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> 中的回复
	<?php }else if($val['action_type'] == notify_class::TYPE_QUESTION_COMMENT){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 评论了你发起的问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
	<?php }else if($val['action_type'] == notify_class::TYPE_ANSWER_AGREE){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 赞同了你在问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> 中的回复
	<?php }else if($val['action_type'] == notify_class::TYPE_ANSWER_THANK){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 感谢了你在问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> 中的回复
	<?php }else if($val['action_type'] == notify_class::TYPE_MOD_QUESTION){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 编辑了你发布的问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
	<?php }else if($val['action_type'] == notify_class::TYPE_REMOVE_ANSWER){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 删除了你在问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> 中的回复
	<?php }else if($val['action_type'] == notify_class::TYPE_REDIRECT_QUESTION){ ?>
		<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> 重定向了你发起的问题 <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
	<?php }else if($val['action_type'] == notify_class::TYPE_CONTEXT){ ?>
		<?php echo $val['content']; ?>
	<?php } ?>
<?php } ?>
	<span>（<?php echo date('Y-m-d H:i:s', $val['add_time']); ?>）</span></div>
    <div class="hide_list hide">
<?php if($val['extend_count'] > 1){ ?>
	<?php foreach($val['extend_details'] as $action_type => $extend){ ?>
		<?php if($action_type == notify_class::TYPE_NEW_ANSWER){ ?>
			<p><?php echo $extend['count'];?> 个新回复，按回答人查看：<?php $count = 0; foreach($extend['users'] as $user){ ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if($count < count($extend['users'])){ ?>、<?php } ?><?php } ?></p>
		<?php }else if($action_type == notify_class::TYPE_ANSWER_COMMENT){ ?>
			<p><?php echo $extend['count'];?> 个新评论，按评论人查看：<?php $count = 0; foreach($extend['users'] as $user){ ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if($count < count($extend['users'])){ ?>、<?php } ?><?php } ?></p>
		<?php }else if($action_type == notify_class::TYPE_ANSWER_AGREE){ ?>
			<p><?php echo $extend['count'];?> 个新赞同，按赞同者查看：<?php $count = 0; foreach($extend['users'] as $user){ ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if($count < count($extend['users'])){ ?>、<?php } ?><?php } ?></p>
		<?php }else if($action_type == notify_class::TYPE_ANSWER_THANK){ ?>
			<p><?php echo $extend['count'];?> 个新感谢，按感谢者查看：<?php $count = 0; foreach($extend['users'] as $user){ ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if($count < count($extend['users'])){ ?>、<?php } ?><?php } ?></p>
		<?php }else if($action_type == notify_class::TYPE_MOD_QUESTION){ ?>
			<p><?php echo $extend['count'];?> 次编辑问题，按编辑者查看：<?php $count = 0; foreach($extend['users'] as $user){ ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if($count < count($extend['users'])){ ?>、<?php } ?><?php } ?></p>
		<?php }else if($action_type == notify_class::TYPE_REDIRECT_QUESTION){ ?>
			<p><?php $count = 0; foreach($extend['users'] as $user){ ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if($count < count($extend['users'])){ ?>、<?php } ?><?php } ?> 重定向了你发布的问题</p>
		<?php }else if($action_type == notify_class::TYPE_REMOVE_ANSWER){ ?>
			<p><?php echo $extend['count'];?> 个回复被删除</p>
		<?php }else if($action_type == notify_class::TYPE_INVITE_QUESTION){ ?>
			<p><?php $count = 0; foreach($extend['users'] as $user){ ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if($count < count($extend['users'])){ ?>、<?php } ?><?php } ?> 邀请你参与问题</p>
		<?php } ?>
	<?php } ?>
<?php } ?>
    </div>
	</li>
<?php } ?>
<?php TPL::output('global/debuger.tpl.htm'); ?>